/*
 * @Description: 
 * @Author: changqing
 * @Date: 2021-08-29 22:11:24
 * @LastEditTime: 2021-08-29 22:14:07
 * @LastEditors: changqing
 * @Usage: 
 */
var { zip,of,timer, interval } = require('rxjs');
var { map} = require('rxjs/operators');

const sourceA = interval(1000).pipe(map((data) => `A${++data}`));
  const sourceB = interval(2000).pipe(map((data) => `B${++data}`));
  const sourceC = interval(3000).pipe(map((data) => `C${++data}`));

  zip(sourceA, sourceB, sourceC).subscribe((data) => {
  console.log(`zip 示例: ${data}`);
});
/**
 zip 示例: A1,B1,C1
 zip 示例: A2,B2,C2
 zip 示例: A3,B3,C3
 */